package com.csi.okr.mobile.update;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import com.csi.okr.mobile.common.task.DataTask;

/**
 * 强制刷新
 * 
 * @author Administrator
 *
 */
@Controller
@RequestMapping("/refresh")
public class UpdateConllter {
	@Resource
	DataTask dt;
	String info = "update";

	/**
	 * 更新初始化信息
	 * 
	 * @return
	 */
	@RequestMapping(value = "/Init")
	public String update() {
		dt.initData();
		return info;
	}

	/**
	 * 更新组织结构信息
	 * 
	 * @return
	 */
	@RequestMapping(value = "/OrgStructure")
	public String updateOrganizationTree() {
		dt.doOrgStructure();
		return info;
	}

	/**
	 * 更新所有的信息
	 * 
	 * @return
	 */
	@RequestMapping(value = "/All")
	public String updateAll() {
		dt.execute();
		return info;
	}
}
